package cn.duli.xianer.service;

import cn.duli.xianer.pojo.ReceiveAddress;

import java.util.List;

public interface ReceiveAddressService {

    /**
     * 新增收货地址
     * @param receiveAddress
     */
    void save(ReceiveAddress receiveAddress);

    /**
     * 修改收货地址
     * @param receiveAddress
     */
    void update(ReceiveAddress receiveAddress);

    /**
     * 根据id删除此收货地址
     * @param raId
     */
    void deleteById(Integer raId);

    /**
     * 根据id查询此收货地址详情
     * @param raId
     * @return
     */
    ReceiveAddress findById(Integer raId);

    /**
     * 查询收货地址列表
     * @return
     */
    List<ReceiveAddress> findAll();

    /**
     * 修改默认收货地址
     * @param receiveAddress
     */
    void updateDefault(ReceiveAddress receiveAddress);

    /**
     * 根据用户id查看该用户的收货地址列表
     * @param raUid
     * @return
     */
    List<ReceiveAddress> findByUserId(Integer raUid);
}
